#include <vector>

#include "gtest/gtest.h"

using std::vector;

extern int CoinChange( vector<size_t>& nums, size_t amount );

namespace
{
TEST( CoinChange, example1 )
{
    vector<size_t> nums     = vector<size_t>( { 1U, 2U, 5U } );
    int            expected = 3;
    int            got      = CoinChange( nums, 11 );
    ASSERT_EQ( expected, got );
}
TEST( CoinChange, example2 )
{
    vector<size_t> nums     = vector<size_t>( { 2U } );
    int            expected = -1;
    int            got      = CoinChange( nums, 3 );
    ASSERT_EQ( expected, got );
}
TEST( CoinChange, example3 )
{
    vector<size_t> nums     = vector<size_t>( { 1U } );
    int            expected = 0;
    int            got      = CoinChange( nums, 0U );
    ASSERT_EQ( expected, got );
}
TEST( CoinChange, example4 )
{
    vector<size_t> nums     = vector<size_t>( { 1U } );
    int            expected = 1;
    int            got      = CoinChange( nums, 1U );
    ASSERT_EQ( expected, got );
}
TEST( CoinChange, example5 )
{
    vector<size_t> nums     = vector<size_t>( { 1U } );
    int            expected = 2;
    int            got      = CoinChange( nums, 2U );
    ASSERT_EQ( expected, got );
}
}  // namespace